.class final Les/ca0;
.super Ljava/lang/Object;
.source "SubtitleParserHelper.java"

# interfaces
.implements Landroid/os/Handler$Callback;


# instance fields
.field private final a:Les/ba0;

.field private final b:Landroid/os/Handler;

.field private c:Lcom/google/android/exoplayer/q;

.field private d:Z

.field private e:Les/z90;

.field private f:Ljava/io/IOException;

.field private g:Ljava/lang/RuntimeException;

.field private h:Z

.field private i:J


# direct methods
.method public constructor <init>(Landroid/os/Looper;Les/ba0;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0, p1, p0}, Landroid/os/Handler;-><init>(Landroid/os/Looper;Landroid/os/Handler$Callback;)V

    iput-object v0, p0, Les/ca0;->b:Landroid/os/Handler;

    .line 3
    iput-object p2, p0, Les/ca0;->a:Les/ba0;

    .line 4
    invoke-virtual {p0}, Les/ca0;->a()V

    return-void
.end method

.method private a(JLcom/google/android/exoplayer/q;)V
    .locals 10

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 8
    :try_start_0
    iget-object v2, p0, Les/ca0;->a:Les/ba0;

    iget-object v3, p3, Lcom/google/android/exoplayer/q;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v3}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v3

    iget v4, p3, Lcom/google/android/exoplayer/q;->c:I

    invoke-interface {v2, v3, v0, v4}, Les/ba0;->a([BII)Les/aa0;

    move-result-object v2
    :try_end_0
    .catch Lcom/google/android/exoplayer/ParserException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0

    move-object v4, v2

    move-object v2, v1

    goto :goto_0

    :catch_0
    move-exception v2

    move-object v4, v1

    goto :goto_0

    :catch_1
    move-exception v2

    move-object v4, v1

    move-object v1, v2

    move-object v2, v4

    .line 9
    :goto_0
    monitor-enter p0

    .line 10
    :try_start_1
    iget-object v3, p0, Les/ca0;->c:Lcom/google/android/exoplayer/q;

    if-eq v3, p3, :cond_0

    goto :goto_1

    .line 11
    :cond_0
    new-instance p3, Les/z90;

    iget-boolean v5, p0, Les/ca0;->h:Z

    iget-wide v8, p0, Les/ca0;->i:J

    move-object v3, p3

    move-wide v6, p1

    invoke-direct/range {v3 .. v9}, Les/z90;-><init>(Les/aa0;ZJJ)V

    iput-object p3, p0, Les/ca0;->e:Les/z90;

    .line 12
    iput-object v1, p0, Les/ca0;->f:Ljava/io/IOException;

    .line 13
    iput-object v2, p0, Les/ca0;->g:Ljava/lang/RuntimeException;

    .line 14
    iput-boolean v0, p0, Les/ca0;->d:Z

    .line 15
    :goto_1
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit p0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw p1
.end method

.method private b(Lcom/google/android/exoplayer/o;)V
    .locals 5

    .line 14
    iget-wide v0, p1, Lcom/google/android/exoplayer/o;->q:J

    const-wide v2, 0x7fffffffffffffffL

    cmp-long v4, v0, v2

    if-nez v4, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    iput-boolean v0, p0, Les/ca0;->h:Z

    if-eqz v0, :cond_1

    const-wide/16 v0, 0x0

    goto :goto_1

    .line 15
    :cond_1
    iget-wide v0, p1, Lcom/google/android/exoplayer/o;->q:J

    :goto_1
    iput-wide v0, p0, Les/ca0;->i:J

    return-void
.end method


# virtual methods
.method public declared-synchronized a()V
    .locals 2

    monitor-enter p0

    .line 1
    :try_start_0
    new-instance v0, Lcom/google/android/exoplayer/q;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Lcom/google/android/exoplayer/q;-><init>(I)V

    iput-object v0, p0, Les/ca0;->c:Lcom/google/android/exoplayer/q;

    const/4 v0, 0x0

    .line 2
    iput-boolean v0, p0, Les/ca0;->d:Z

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Les/ca0;->e:Les/z90;

    .line 4
    iput-object v0, p0, Les/ca0;->f:Ljava/io/IOException;

    .line 5
    iput-object v0, p0, Les/ca0;->g:Ljava/lang/RuntimeException;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 6
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public a(Lcom/google/android/exoplayer/o;)V
    .locals 2

    .line 7
    iget-object v0, p0, Les/ca0;->b:Landroid/os/Handler;

    const/4 v1, 0x0

    invoke-virtual {v0, v1, p1}, Landroid/os/Handler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;

    move-result-object p1

    invoke-virtual {p1}, Landroid/os/Message;->sendToTarget()V

    return-void
.end method

.method public declared-synchronized b()Les/z90;
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    monitor-enter p0

    const/4 v0, 0x0

    .line 1
    :try_start_0
    iget-object v1, p0, Les/ca0;->f:Ljava/io/IOException;

    if-nez v1, :cond_1

    .line 2
    iget-object v1, p0, Les/ca0;->g:Ljava/lang/RuntimeException;

    if-nez v1, :cond_0

    .line 3
    iget-object v1, p0, Les/ca0;->e:Les/z90;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 4
    :try_start_1
    iput-object v0, p0, Les/ca0;->e:Les/z90;

    .line 5
    iput-object v0, p0, Les/ca0;->f:Ljava/io/IOException;

    .line 6
    iput-object v0, p0, Les/ca0;->g:Ljava/lang/RuntimeException;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 7
    monitor-exit p0

    return-object v1

    .line 8
    :cond_0
    :try_start_2
    iget-object v1, p0, Les/ca0;->g:Ljava/lang/RuntimeException;

    throw v1

    .line 9
    :cond_1
    iget-object v1, p0, Les/ca0;->f:Ljava/io/IOException;

    throw v1
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    :catchall_0
    move-exception v1

    .line 10
    :try_start_3
    iput-object v0, p0, Les/ca0;->e:Les/z90;

    .line 11
    iput-object v0, p0, Les/ca0;->f:Ljava/io/IOException;

    .line 12
    iput-object v0, p0, Les/ca0;->g:Ljava/lang/RuntimeException;

    .line 13
    throw v1
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    :catchall_1
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized c()Lcom/google/android/exoplayer/q;
    .locals 1

    monitor-enter p0

    .line 1
    :try_start_0
    iget-object v0, p0, Les/ca0;->c:Lcom/google/android/exoplayer/q;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit p0

    return-object v0

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized d()Z
    .locals 1

    monitor-enter p0

    .line 1
    :try_start_0
    iget-boolean v0, p0, Les/ca0;->d:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit p0

    return v0

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized e()V
    .locals 5

    monitor-enter p0

    .line 1
    :try_start_0
    iget-boolean v0, p0, Les/ca0;->d:Z

    const/4 v1, 0x1

    if-nez v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    invoke-static {v0}, Lcom/google/android/exoplayer/util/b;->b(Z)V

    .line 2
    iput-boolean v1, p0, Les/ca0;->d:Z

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Les/ca0;->e:Les/z90;

    .line 4
    iput-object v0, p0, Les/ca0;->f:Ljava/io/IOException;

    .line 5
    iput-object v0, p0, Les/ca0;->g:Ljava/lang/RuntimeException;

    .line 6
    iget-object v0, p0, Les/ca0;->b:Landroid/os/Handler;

    iget-object v2, p0, Les/ca0;->c:Lcom/google/android/exoplayer/q;

    iget-wide v2, v2, Lcom/google/android/exoplayer/q;->e:J

    invoke-static {v2, v3}, Lcom/google/android/exoplayer/util/o;->b(J)I

    move-result v2

    iget-object v3, p0, Les/ca0;->c:Lcom/google/android/exoplayer/q;

    iget-wide v3, v3, Lcom/google/android/exoplayer/q;->e:J

    .line 7
    invoke-static {v3, v4}, Lcom/google/android/exoplayer/util/o;->a(J)I

    move-result v3

    iget-object v4, p0, Les/ca0;->c:Lcom/google/android/exoplayer/q;

    .line 8
    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/os/Handler;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    .line 9
    invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 10
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public handleMessage(Landroid/os/Message;)Z
    .locals 4

    .line 1
    iget v0, p1, Landroid/os/Message;->what:I

    const/4 v1, 0x1

    if-eqz v0, :cond_1

    if-eq v0, v1, :cond_0

    goto :goto_0

    .line 2
    :cond_0
    iget v0, p1, Landroid/os/Message;->arg1:I

    iget v2, p1, Landroid/os/Message;->arg2:I

    invoke-static {v0, v2}, Lcom/google/android/exoplayer/util/o;->a(II)J

    move-result-wide v2

    .line 3
    iget-object p1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast p1, Lcom/google/android/exoplayer/q;

    .line 4
    invoke-direct {p0, v2, v3, p1}, Les/ca0;->a(JLcom/google/android/exoplayer/q;)V

    goto :goto_0

    .line 5
    :cond_1
    iget-object p1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast p1, Lcom/google/android/exoplayer/o;

    invoke-direct {p0, p1}, Les/ca0;->b(Lcom/google/android/exoplayer/o;)V

    :goto_0
    return v1
.end method
